package leetcode.biweekly.week94;

//Solution4Test
public class Solution4 {

	int mod = (int) 1e9 + 7;

	public int countAnagrams(String s) {
		long ans = 0;
		String[] strs = s.split(" ");
		for (String ss : strs) {
			long cur = f(ss);
			ans *= cur;
			ans %= mod;
		}
		return (int) ans;
	}

	private long f(String s) {
		// ab - ab ba
		// aa - aa
		// too too oto oot
		int[] h = new int[26];
		for (char c : s.toCharArray()) {
			h[c - 'a']++;
		}
		Long[][] dp = new Long[26][s.length()];
		return ff(h, s.length(), dp);
	}

	private long ff(int[] h, int length, Long[][] dp) {
		if (length == 0) {
			return 1;
		}

		long ans =0;
		for (int i = 0; i < 26; i++) {
			if (h[i] != 0) {
//				h[i]
			}
		}
		return ans;
	}

}
